package bupt.xixi.hook;

//public class ShutdownHook {
//
//    private static final Logger logger = LoggerFactory.getLogger(ShutdownHook.class);
//
//    private static final ShutdownHook shutdownHook = new ShutdownHook();
//
//    public static ShutdownHook getShutdownHook(){
//        return shutdownHook;
//    }
//
//    public void addClearAllHook(){
//        logger.info("在关闭前自动注销所有服务");
//        Runtime.getRuntime().addShutdownHook(new Thread(()->{
//            String host = InetAddress.getLocalHost().getHostName();
//            int port = InetAddress.
//            NacosServiceProvider.clearRegistry();
//        }));
//    }
//}
